As is known, the art and science of three-dimensional (“3-D”) computer graphics concerns the generation, or rendering, of two-dimensional (“2-D”) images of 3-D objects for display or presentation onto a display device or monitor, such as a Cathode Ray Tube (CRT) or a Liquid Crystal Display (LCD). The object may be a simple geometry primitive such as a point, a line segment, a triangle, or a polygon. More complex objects can be rendered onto a display device by representing the objects with a series of connected planar polygons, such as, for example, by representing the objects as a series of connected planar triangles. All geometry primitives may eventually be described in terms of one vertex or a set of vertices, for example, coordinates (x, y, z) that define a point, for example, the endpoint of a line segment, or a corner of a polygon.
To generate a data set for display as a 2-D projection representative of a 3-D primitive onto a computer monitor or other display device, the vertices of the primitive are processed through a series of operations, or processing stages in a graphics-rendering pipeline. A generic pipeline is merely a series of cascading processing units, or stages, wherein the output from a prior stage serves as the input for a subsequent stage. In the context of a graphics processor, these stages include, for example, per vertex operations, primitive assembly operations, pixel operations, texture assembly operations, rasterization operations, and fragment operations.
In a typical graphics display system, an image database (e.g., a command list) may store a description of the objects in the scene. The objects are described with a number of small polygons, which cover the surface of the object in the same manner that a number of small tiles can cover a wall or other surface. Each polygon is described as a list of vertex coordinates (X, Y, Z in “Model” coordinates) and some specification of material surface properties (i.e., color, texture, shininess, etc.), as well as possibly the normal vectors to the surface at each vertex. For three-dimensional objects with complex curved surfaces, the polygons in general must be triangles or quadrilaterals, and the latter can always be decomposed into pairs of triangles.
A transformation engine transforms the object coordinates in response to the angle of viewing selected by a user from user input. In addition, the user may specify the field of view, the size of the image to be produced, and the back end of the viewing volume so as to include or eliminate background as desired.
Once this viewing area has been selected, clipping logic eliminates the polygons, (i.e., triangles) which are outside the viewing area and “clips” the polygons, which are partly inside and partly outside the viewing area. These clipped polygons will correspond to the portion of the polygon inside the viewing area with new edge(s) corresponding to the edge(s) of the viewing area. The polygon vertices are then transmitted to the next stage in coordinates corresponding to the viewing screen (in X, Y coordinates) with an associated depth for each vertex (the Z coordinate). In a typical system, the lighting model is next applied taking into account the light sources. The polygons with their color values are then transmitted to a rasterizer, which generates blank pixels grouped into tiles for further visibility determination or hidden surface removal and texturing/coloring of remaining pixels.
Reference is now made to FIG. 1, which illustrates a modern implementation of a hidden surface removal unit, sometimes referred as a z-data processing unit. As is known, system performance is improved through the use of two-level implementation hidden surface removal pipeline. On the first level, a ZL1 unit processes the z-data for a block or tile of multiple pixels. For pixels within a tile in which the z-data exceeds the range of the format associated with ZL1, the z-data must be processed at the pixel level in a pixel z-data processing unit, sometimes referred to as ZL2.
The terms ZL1 and ZL2 generally stand for Z Buffer Level 1 and Z Buffer Level 2, respectively. There are several names for this type of algorithm including Hyper Z and Hierarchy Z Buffer. The two-level Z unit implementation allows the storage of higher level depth information for a larger block of pixels, such as a tile, and the storage of depth information for the smallest granularity, such as an individual pixel in a screen. One advantage of ZL1 is to reduce the computing complexity of depth data in the rendering pipeline.
A tile generator 100 generates tile data (i.e., a pixel mask) for the tile of pixels (e.g., an eight-by-eight grid) and sends a request to a cache, called the ZL1 cache 104. The tile data is sent to ZL1 102, which in turn communicates with the ZL1 cache 104 and defines visibility at the tile level. For the pixels having z-data that cannot be processed in ZL1 102, the z-data is processed in the pixel level z-data processing unit 106, ZL2, in coordination with a ZL2 cache 108. In this configuration, ZL1 102 can reject up to sixty-four pixels in one cycle and the non-rejected pixels are marked as accepted or retested to reduce the ZL2 106 memory traffic.
As the performance of graphics chips continues to grow, memory bandwidth requirements are becoming the overriding factor in limiting overall performance when performing operations such as those discussed above. According to Moore's Law, the increase in memory bandwidth generally lags behind the increase in on-chip computational power. Thus, in many instances, the overall performance of the graphics engine in a system is ultimately limited by the amount of video memory bandwidth available. While internal caching and data compression schemes have been used to address the issue of limited memory bandwidth, the efficiency of caching schemes is highly dependent on memory access consistency. One major issue is that the presence of triangle primitives of considerable pixel size adversely affects the performance of the cache within the graphics chip, rendering the caching scheme almost useless. Therefore, a heretofore unaddressed need exists in the industry to address the aforementioned deficiencies and inadequacies.